#include <stdio.h>

int main(void) {
	int x;
	scanf("%d", &x);
	int a = 0, b = 0, c = 0, d = 0;
	if ((x % 2 == 0) && (4 < x && x <= 12)) {
		a = 1;
		b = 1;
	} else if ((x % 2 == 0) || (4 < x && x <= 12)) {
		b = 1;
		c = 1;
	} else {
		d = 1;
	}
	printf("%d %d %d %d", a, b, c, d);
	return 0;
}